#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (c) 2019, Linas Nikiperavicius
#
# This file is part of the modm project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# -----------------------------------------------------------------------------


def init(module):
    module.name = ":driver:tlc594x"
    module.description = """\
# TLC594* 12-bit PWM Driver

TLC594* multi-channel, daisy-chainable, constant-current sink, 12bit PWM LED driver.
"""

def prepare(module, options):
    module.depends(
	    ":architecture:delay",
	    ":architecture:gpio",
	    ":architecture:spi")
    return True

def build(env):
    env.outbasepath = "modm/src/modm/driver/pwm"
    env.copy("tlc594x.hpp")
    env.copy("tlc594x_impl.hpp")
